<div class="pageContent">
	
	<form method="post" action="/index.php?act=produce&st=small_class_add" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
		<div class="pageFormContent" layoutH="58">

			<div class="unit">
				<label>产品小类：</label>
				<input name="produce_name" type="text" size="30" value="" class="required" errormsg="请输入产品小类名称"/>
			</div>
			<div class="unit">
				<label>所属大类：</label>
				<select class="combox" name="parent_id">
					{foreach item=item from=$type}
					<option value="{$item.product_class_id}">{$item.class_name}</option>
					{/foreach}
				</select>
			</div>
			<div class="unit">
				<label>是否有效：</label>
				<label><input type="radio" name="status" value="0" checked/>有效</label>
				<label><input type="radio" name="status" value="1" />无效</label>
			</div>
			<div class="divider"></div>
			<p>
				<label>汽运：</label>
				<input name="motor.name" type="text" readonly/>
				<a class="btnLook" href="/index.php?act=produce&st=area" width="830" height="400" lookupGroup="motor">查找汽运区域</a>
			</p>
			<p>
				<label>水汽联运：</label>
				<input name="motor_shipping.name" type="text" readonly/>
				<a class="btnLook" href="/index.php?act=produce&st=area" width="830" height="400" lookupGroup="motor_shipping">查找水汽联运区域</a>
			</p>
			<p>
				<label>船运：</label>
				<input name="shipping.name" type="text" readonly/>
				<a class="btnLook" href="/index.php?act=produce&st=area" width="830" height="400" lookupGroup="shipping">查找船运区域</a>
			</p>
			<p>
				<label>火运：</label>
				<input name="train.name" type="text" readonly/>
				<a class="btnLook" href="/index.php?act=produce&st=area" width="830" height="400" lookupGroup="train">查找火运区域</a>
			</p>
			<div class="divider"></div>
			<div class="unit">
				<label>基准价基础：</label>
				<div><center>
					<table class="list nowrap itemDetail" addButton="添加基准价" width="95%">
						<thead>
							<tr>
								<th type="text" name="marerials[]" size="24" fieldClass="required">材质基础</th>
								<th type="text" name="format[]" size="24" fieldClass="required">规格基础</th>
								<th type="text" name="marerial[#index#][]" size="24">材质</th>
								<th type="add,del" width="60">操作</th>
							</tr>
						</thead>
						<tbody></tbody>
					</table></center>
				</div>
			</div>

		</div>
		
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>

	</form>

</div>

<script type="text/javascript">
$(function(){
	$("a.btnAdd").die("click");
	$("a.btnAdd").live("click",function(){
		var obj = $(this).parents("tr");
		var html = '<br/><input type="text" name="marerial['+obj.index()+'][]" value="" size="24" class="textInput valid">';
		obj.find("td:eq(2)").append(html);
	});
});
</script>